<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.kaishengit.entity.Goal" %>
<%@ page import="com.kaishengit.entity.Task" %>
<!DOCTYPE HTML>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title></title>
	<link rel="stylesheet" href="css/bootstrap.min.css" />
	<script type="text/javascript"src="js/jquery.js"></script>
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
	
	<style type="text/css">
		a:hover{
			text-decoration:none;
		}
		
	</style>
</head>
<body>
	<div class="navbar">
		<div class="navbar-inner">
			<div class="container">
				 
				<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
				<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</a>
				 
				<!-- Be sure to leave the brand out there if you want it shown -->
				<a class="brand" href="#">目标列表</a>
				 
				<!-- Everything you want hidden at 940px or less, place within here -->
				<ul class="nav pull-right">
					<li>
						<a href="#">欢迎您：</a>
					</li>
					<li class="divider-vertical"></li>
					<li style="margin-top:10px;">abc</li>
				</ul>
			</div>
		</div>
    </div>
    
    
   
    
    
     <%
    		HashMap numbers = (HashMap)request.getAttribute("numbers");
    		List<Goal> listgoal = (List<Goal>)request.getAttribute("listgoal");
    %>
    
    <%
    	if(listgoal.size()!=0) {
    	for(Goal goal : listgoal) {
    %>
	
	<ul class="breadcrumb" style="margin-left:200px;margin-bottom:0px;border-radius: 3px 3px 0 0;margin-top:15px;width:800px;">
		<li class="active">
			<a href="project.html">
				<i class="icon-th"></i>
				<%=goal.getName() %>
			</a>
		</li>
	</ul>
	<div style="border:1px #ccc solid;margin-left:200px;width:828px;border-top:none;height:auto;">
		<p style="padding:15px;border-bottom:1px #ccc solid;"><%=goal.getDesc() %></p>
		
		<p class="span8">
			<table class="table table-striped">
				<thead style="font-size:16px;">
					<tr>
						
						<th style="min-width:130px;">任务名：</th>
						<th style="min-width:130px;">进度：</th>
						<th style="min-width:330px;">任务简介：</th>
						
					</tr>
				</thead>
				<tbody >
					<%
					List<Task> listtask = (List<Task>)numbers.get(goal.getName());
					System.out.println("11111111111111111111111111111"+listgoal);
					System.out.println("11111111111111111111111111111"+listtask);
					
					if(listtask.size()==0) {
						
				%>
				
					<tr>
						<td colspan="3">该项目暂且没有任务</td>
					</tr>
					
					
				<%} else if(listtask!=null){
					for(Task task:listtask) {
				%>
					<tr>
						
						<td><%=task.getName() %></td>
						<td>111111</td>
						<td><%=task.getDesc() %></td>
					</tr>
					
					
				<%} %>
				<%} %>	
				</tbody>
			</table>
		</p>
		<%
			String projectname = (String)request.getAttribute("projectname");
			pageContext.setAttribute("goal",goal);
		%>
				
		<a   href="newtaskview.jspx?goalname=<%=goal.getName()%>&projectname=<%=projectname%>"><button class="btn btn-success" href="#" style="margin-left:600px;margin-bottom:20px;" >添加任务</button></a>
		<a  href="projectlistview.jspx"><button class="btn btn-primary" href="#"style="margin-bottom:20px;"  >项目列表</button></a>
	</div>
	
	<%} }else {%>
		<ul class="breadcrumb" style="margin-left:200px;margin-bottom:0px;border-radius: 3px 3px 0 0;margin-top:15px;width:800px;">
		<li class="active">
			<a href="project.html">
				<i class="icon-th"></i>
				目标名
			</a>
		</li>
	</ul>
	<div style="border:1px #ccc solid;margin-left:200px;width:828px;border-top:none;height:auto;">
		<p style="padding:15px;border-bottom:1px #ccc solid;">-------------</p>
		
		<p class="span8">
			<table class="table table-striped">
				<thead style="font-size:16px;">
					<tr>
						
						<th style="min-width:130px;">-------</th>
						<th style="min-width:130px;">-------</th>
						<th style="min-width:330px;">-------</th>
						
					</tr>
				</thead>
				<tbody >
					<tr>
						<td>暂无目标</td>
					
					</tr>
				</tbody>
			</table>
		</p>
		<%
			Goal goal =(Goal)pageContext.getAttribute("goal");
		    String projectname = (String)request.getAttribute("projectname");
		%>
		
		<a href=""><button class="btn btn-success" href="#"  style="margin-left:670px;margin-bottom:20px;">添加任务</button></a>
				
	</div>
	<%} %>
	
</body>
</html>
